package day4;

import java.util.Arrays;
import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        // 录入100名学生的考试成绩.
        Scanner input = new Scanner(System.in);
        int[] scores = new int[3];


        for (int i = 0; i < scores.length; i++) {
            System.out.print("请输入第" + (i + 1) + "位学生的成绩:");
            scores[i] = input.nextInt();
        }
        // 排序,[默认]升序(低到高),降序(高到低)
        Arrays.sort(scores);
        for (int i = scores.length - 1; i >= 0; i--) {
            System.out.print(scores[i] + "  ");
        }
    }
}
